sudo: required

language: go

go:
  - 1.14.x

services:
  - docker

env:
  - PATH=$HOME/protoc/bin:$PATH

before_script:
- "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash"

jobs:
  include:
    - stage: Tests
      name: Unit Tests
      script:
        - make unit-test
    - name: Integration Tests
      script:
        - make integration
    - stage: Compliance
      name: Fossa Check
      script:
        - "fossa --option allow-unresolved:true"

after_success:
  - bash <(curl -s https://codecov.io/bash)
